package com.tom.blog.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tom.blog.dao.UserFileDao;
import com.tom.blog.entity.UserFile;
import com.tom.blog.service.UserFileService;

/**
 * File 服务.
 */
@Service
public class UserFileServiceImpl implements UserFileService {
	
	@Autowired
	public UserFileDao dao;

	@Override
	public UserFile save(UserFile file) {
		return dao.save(file);
	}

	@Override
	public void remove(String id) {
		dao.delete(id);
	}

	@Override
	public UserFile get(String id) {
		return dao.findOne(id);
	}

	@Override
	public List<UserFile> listFiles() {
		return dao.findAll();
	}

}
